package com.example.understand_compose1.testcase_activity

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import android.widget.TextView
import com.example.understand_compose1.R

class FetIntentGetValueActivity: Activity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.calc_layout)
        // 从QQLoginActivity获取的Intent传值
        val fromQQLoginAccount: String = intent.getStringExtra("account").toString();
        val fromQQLoginPassword: String = intent.getStringExtra("password").toString();

        val tv_calc_user:TextView = this.findViewById(R.id.calc_user)
        val tv_calc_password:TextView = this.findViewById(R.id.calc_password)

        tv_calc_user.setText("Username:$fromQQLoginAccount")
        tv_calc_password.setText("Password:$fromQQLoginPassword")


        // 计算器页面密码TextView点击隐式跳转
        tv_calc_password.setOnClickListener {
            val toFet4Intent = Intent()

            toFet4Intent.setAction("org.fuckerfucker.FET3_JUMP")
            toFet4Intent.addCategory("android.intent.category.DEFAULT")
            startActivity(toFet4Intent)
        }

    }
}